﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.Application
{
    public class PermissionInput
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; }


        /// <summary>
        /// 权限代码（每一个接口）
        /// </summary>
        public string PermissionCode { get; set; }


        /// <summary>
        /// 排序
        /// </summary>
        public int Ord { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }


        /// <summary>
        /// 分组
        /// </summary>
        public int Sort { get; set; }

    }


    public class PermissionAddInput: PermissionInput
    {

    }

    public class PermissionEditInput: PermissionInput
    {
        public int Id { get; set; }
    }


    public class PermissionSearchPageInput
    {
        /// <summary>
        /// 页码
        /// </summary>
        [Required(ErrorMessage = "页码不能为空")]
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页容量
        /// </summary>
        [Required(ErrorMessage = "页容量不能为空"), Range(5, 30, ErrorMessage = ("页码只能在 5 到 30 之间"))]
        public int PageSize { get; set; } = 20;


        public int Sort { get; set; }

        /// <summary>
        /// 关键字
        /// </summary>
        public string Keyword { get; set; }

    }


    public class PermissionSearchInput
    {

        /// <summary>
        /// 关键字
        /// </summary>
        public string Keyword { get; set; }

    }



    public class PermissionDeleteRangeInput
    {
        public int[] Ids { get; set; }
    }

}
